package com.suray.wcs.service.pojo.rgv.action;

import com.suray.wcs.res.enums.Order;

public class RgvCommandAction extends RgvAction {

    /**
     * 任务序号
     */
    private Integer taskNo;

    /**
     * 如果为指令,指令码
     */
    private Order actionType;

    /**
     * 段序号
     */
    private int cmdParam;

    public RgvCommandAction() {
        super();
    }

    public Order getActionType() {
        return actionType;
    }

    public void setActionType(Order actionType) {
        this.actionType = actionType;
    }

    public Integer getTaskNo() {
        return taskNo;
    }

    public void setTaskNo(Integer taskNo) {
        this.taskNo = taskNo;
    }

    public int getCmdParam() {
        return cmdParam;
    }

    public void setCmdParam(int cmdParam) {
//        if (this.cmdParam > cmdParam) {
//            throw new RuntimeException("小车当前任务步数小于历史步数 --> 历史:" + this.cmdParam + ", 当前:" + cmdParam);
//        }

        this.cmdParam = cmdParam;
    }

    @Override
    public String toString() {
        return "RgvCommandAction{" +
                super.toString() +
                "actionType=" + actionType +
                '}';
    }
}
